// Copyright 2010 Google Inc.  All Rights Reserved
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//
// Deprecated. This file is made obsolete by comparable_view.h
// TODO(user): Remove it from the code base.
//
//
// Allows for comparison of two test blocks. It check whether
// specified schema is the same for both views (in terms of types).
// Does take into account whether columns contain nulls.
//
// Example usage:
//    scoped_ptr<Block> block(
//      BlockBuilder<STRING, INT32>()
//      .AddRow("first", 12)
//      .AddRow("second", __)
//      .Build());
//    EXPECT_TRUE(Compare(block, block).is_success());
//

#ifndef SUPERSONIC_TESTING_VIEW_COMPARATOR_H_
#define SUPERSONIC_TESTING_VIEW_COMPARATOR_H_

#include "supersonic/base/exception/result.h"

namespace supersonic {


class Block;
class View;

FailureOrVoid Compare(const View& left, const View& right);

FailureOrVoid Compare(const Block& left, const Block& right);

FailureOrVoid Compare(const View& view, const Block& block);

FailureOrVoid Compare(const Block& block, const View& view);

}  // namespace supersonic

#endif  // SUPERSONIC_TESTING_VIEW_COMPARATOR_H_
